@include('Home.head')
<style>

    .am-header-default{
        background-color: #CC3436;
    }
       .row {
        margin-bottom: .25rem;
    }

    .row > .cell-6 {
        width: 50%;
        padding: 2px 5px 5px 5px;
    }

    .row, .column {
        display: flex;
        margin: -.25rem -.25rem 0;
        margin-bottom: 0px;
        -webkit-flex-wrap: wrap;
        -ms-flex-wrap: wrap;
        flex-wrap: wrap;
        -webkit-align-items: stretch;
        -ms-flex-align: stretch;
        align-items: stretch;
        -webkit-align-content: stretch;
        -ms-flex-line-pack: stretch;
        align-content: stretch;
        -webkit-flex: auto;
        -ms-flex: auto;
        flex: auto;
    }

    .row, .column {
        display: -webkit-flex;
        display: -ms-flexbox;
        display: flex;
        margin: -.25rem -.25rem 0;
        margin-bottom: 0px;
        -webkit-flex-wrap: wrap;
        -ms-flex-wrap: wrap;
        flex-wrap: wrap;
        -webkit-align-items: stretch;
        -ms-flex-align: stretch;
        align-items: stretch;
        -webkit-align-content: stretch;
        -ms-flex-line-pack: stretch;
        align-content: stretch;
        -webkit-flex: auto;
        -ms-flex: auto;
        flex: auto;
    }

    .wai {
        background-color: rgba(48, 149, 244, 1.00);
        color: #000;
        text-align: center;
        border-radius: 5px;
        height: 75px;
        line-height: 25px;
        padding-top: 15px;
        background-image: url(http://www.tp5.com/uploads/2.png);
        background-size: cover;
        background-size: 100%;
    }

    .am-modal-dialog {
        height: 350px;
    }

    .notice .head {
        font-size: 16px;
    }

    .notice .head .head-left {
        color: #c61b18;
        margin-right: 10px;
        font-size: 14px;
    }

    .notice .head .head-right {
        color: #a2a1ad;
        margin-right: 10px;
    }

    .notice .title {
        font-size: 18px;
        font-weight: bold;
        text-align: left;
        line-height: 2;

    }

    .notice .title1 {
        line-height: 2;
        text-align: left;
        color: #505050;
        font-weight: 600;
    }

    .notice .content {
        line-height: 2;
        text-indent: 2rem;
        text-align: left;
        color: #505050;
        /*font-weight: 600;*/
    }
    .roll {
        position: absolute;
        left: 76px;
        top: 0;
        height: 24px;
        right: 10px;
        line-height: 24px;
        overflow: hidden;
    }
    .roll .roll-content {
        position: absolute;
        left: 0;
        white-space: nowrap;
        color: #888;
    }
	.nobor > li{
		border: none;
	}
	.nobor{
		margin-top: 15px;
	}
	.head-style{
		background-color: #FFFFFF;
	}
	.p3{
		font-family: "Lucida Console";
	}
	.imageh{
		height: 152px;
		width: 100%;
		border-radius: 15px 15px 0px 0px;
	}
	
	.goodlist{
		border-radius: 12px;
		height: auto; 
		border: #FFFFFF 2px solid;
		box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
	}
	.textc{
		/* text-align: center; */
	}
	.headera{
		/* border-bottom:#F2F2F2 2px solid; */

	}
	.op{
		text-decoration:line-through;
		color: gray;
		font-weight: 600;
		margin-top: 7px;
		padding-left: 0px;
		font-size: 12px;
		padding-right: 25px;
		border: none;
		margin-top: -4px;
	}
	.goods_class{
		width: 24%;
		display: inline-block;
		padding: 0px 20px;
		margin: 8px -1px;
	}
	.el-input__inner{
		border-radius: 20px 0px 0px 20px;
	}
	
	.el-input-group__append{
		border-radius: 0px 20px 20px 0px;
	}
	.goods_class{
		width: 24%;
		display: inline-block;
		padding: 0px 18px;
		margin: 8px 0px;
	}
	input::-webkit-input-placeholder{
	        text-align: center;
	}
	.el-carousel__container{
		height: 150px;
	}
	.goods_class1{
		width: 24%;
		display: inline-block;
		padding: 0px 20px;
		margin: 0px 2px;
	}
	.sxy-footer .am-navbar-nav{
	    background-color: #fff;
	    box-shadow: 0 1px 4px 0 rgba(34,31,31,.2);
	}
	
		.am-navbar-nav a .am-navbar-label{
		font-size: 14px;
		margin-top: 6px;
	}

		.am-navbar{
		height: 60px;
	}
</style>
<body>
<div class="container" id="app">

    @include('Home.member.header')
    
    {{--<div class="am-cf cart-panel">--}}
        {{--<div class="cart-panel">--}}
            {{--<div class="row">--}}
                {{--<div class="cell-6 q"><div class="tile bg3 rounded wai shadow-1"><b>0.00</b><br>A区总业绩</div></div>--}}
                {{--<div class="cell-6 q"><div class="tile bg3 rounded wai shadow-1"><b>0.00</b><br>B区总业绩</div></div>--}}
                {{--<div class="cell-6 q"><div class="tile bg3 rounded wai shadow-1"><b>0.00</b><br>电子币</div></div>--}}
                {{--<div class="cell-6 q"><div class="tile bg3 rounded wai shadow-1"><b>0.00</b><br>积分</div></div>--}}
                {{--<div class="cell-6 q"><div class="tile bg3 rounded wai shadow-1"><b>0.00</b><br>奖金币</div></div>--}}
                {{--<div class="cell-6 q"><div class="tile bg3 rounded wai shadow-1"><b>0.00</b><br>复投币</div></div>--}}
            {{--</div>--}}
        {{--</div>--}}

    {{--</div>--}}
	<div style="width: 100%;height: auto;">
		<ul class="am-avg-sm-4 uchome-apps-ul nobor" style="margin-top: 20px;margin-bottom: 20px;">
			<li><a href="/home/member/myoreder"><p class="imgp"><img src="http://qiniu.baoliy168.com/%E7%BB%84%E4%BB%B6%209%20%E2%80%93%2013x.png" class="am-img-responsive" /></p><p class="namep">全部订单</p></a></li>
			<li><a href="/home/member/myoreder?st=2"><p class="imgp"><img src="http://qiniu.baoliy168.com/%E7%BB%84%E4%BB%B6%2010%20%E2%80%93%2013x.png" class="am-img-responsive" /></p><p class="namep">已发货</p></a></li>
			<li><a href="/home/member/myoreder?st=1"><p class="imgp"><img src="http://qiniu.baoliy168.com/%E7%BB%84%E4%BB%B6%2011%20%E2%80%93%2013x.png" class="am-img-responsive" /></p><p class="namep">待发货</p></a></li>
			<li><a href="/home/member/myoreder?st=3"><p class="imgp"><img src="http://qiniu.baoliy168.com/%E7%BB%84%E4%BB%B6%2012%20%E2%80%93%2013x.png" class="am-img-responsive" /></p><p class="namep">已完成</p></a></li>
		    
		</ul>
		
		
	</div>
    <div class="am-cf uchome-apps">
    <div class="subtitle" style="position: relative"><span class="vertical-line"></span>常用
        <p class="roll">
            <span class="roll-content">@{{ rollContent }}</span>
        </p>
        </div>
    	<ul class="am-avg-sm-3 uchome-apps-ul nobor">

        	<li><a href="/home/member/myrecord"><p class="imgp"><img src="http://qiniu.baoliy168.com/%E7%BB%84%205937%403x%20%281%29.png" class="am-img-responsive" /></p><p class="namep">交易记录</p><p class="lastp">@{{ count.recordNum }}笔</p></a></li>
            {{--<li><a href="#"><p class="imgp"><img src="/img/home/user/uhomeapp2.png" class="am-img-responsive" /></p><p class="namep">积分订单</p><p class="lastp">0笔</p></a></li>--}}
            {{--<li><a href="#"><p class="imgp"><img src="/img/home/user/uhomeapp3.png" class="am-img-responsive" /></p><p class="namep">团购订单</p><p class="lastp">0笔</p></a></li>--}}
{{--            <li><a href="/home/member/shopcart"><p class="imgp"><img src="http://qiniu.baoliy168.com/%E7%BB%84%203474%403x.png" class="am-img-responsive" /></p><p class="namep">购物车</p><p class="lastp">@{{ count.cart }}件</p></a></li>--}}
            {{--<li><a href="#"><p class="imgp"><img src="/img/home/user/uhomeapp5.png" class="am-img-responsive" /></p><p class="namep">积分充值</p><p class="lastp">0个</p></a></li>--}}
            {{--<li><a href="#"><p class="imgp"><img src="/img/home/user/uhomeapp6.png" class="am-img-responsive" /></p><p class="namep">金币记录</p><p class="lastp">0条</p></a></li>--}}
            {{--<li><a href="#"><p class="imgp"><img src="/img/home/user/uhomeapp7.png" class="am-img-responsive" /></p><p class="namep">收藏商品</p><p class="lastp">0件</p></a></li>--}}
            <li><a href="/home/member/withdraw"><p class="imgp"><img src="http://qiniu.baoliy168.com/%E7%BB%84%205694%403x.png" class="am-img-responsive" /></p><p class="namep">申请提现</p><p class="lastp">&nbsp;</p></a></li>
            {{--<li><a href="#"><p class="imgp"><img src="/img/home/user/uhomeapp9.png" class="am-img-responsive" /></p><p class="namep">我的推广</p><p class="lastp">160</p></a></li>--}}
{{--            <li><a href="#"><p class="imgp"><img src="/img/home/user/uhomeapp10.png" class="am-img-responsive" /></p><p class="namep">我的粉丝</p><p class="lastp">0位</p></a></li>--}}
            <li><a href="/home/member/recharge"><p class="imgp"><img src="/img/home/cz.png" class="am-img-responsive" /></p><p class="namep">积分充值</p><p class="lastp">&nbsp;</p></a></li>
            <li><a href="/home/member/myPartners"><p class="imgp"><img src="http://qiniu.baoliy168.com/%E7%BB%84%E4%BB%B6%2014%20%E2%80%93%201%403x.png" class="am-img-responsive" /></p><p class="namep">商城伙伴</p><p class="lastp">&nbsp;</p></a></li>
            {{--<li><a href="#"><p class="imgp"><img src="/img/home/user/uhomeapp12.png" class="am-img-responsive" /></p><p class="namep">我的消息</p><p class="lastp">0条</p></a></li>--}}
            <!-- <li><a href="/home/member/transfer"><p class="imgp"><img src="/img/home/user/uhomeapp13.png" class="am-img-responsive" /></p><p class="namep">转账交易</p><p class="lastp">&nbsp;</p></a></li> -->
            <li >
                <a href="/home/index/supply_order">
                    <p class="imgp">
                        <img src="/img/home/user/apply.png" class="am-img-responsive" />
                    </p>
                    <p class="namep">供应链订单</p>
                    <p class="lastp">&nbsp;</p>
                </a>
            </li>
            <li><a href="/home/member/finance"><p class="imgp"><img src="http://qiniu.baoliy168.com/%E7%BB%84%203562%403x.png" class="am-img-responsive" /></p><p class="namep">代理管理</p><p class="lastp">&nbsp;</p></a></li>
            <!-- <li>
                <a href="/home/stores/index"> 
                    <p class="imgp">
                        <img src="/img/home/user/myInfo.png" class="am-img-responsive" />
                    </p>
                    <p class="namep">积分兑换</p>
                    <p class="lastp">&nbsp;</p>
                </a>
            </li> -->


           <!-- <li><a href="/home/member/finance"><p class="imgp"><img src="/img/home/user/finance.png"
                                                                    class="am-img-responsive"/></p> -->
			<!-- <li><a href="/home/member/myuser"><p class="imgp"><img src="/img/home/user/finance.png"
			                                                         class="am-img-responsive"/></p> -->														
                   <!-- <p class="namep">个人业绩</p>
                    <p class="lastp">&nbsp;</p></a></li> -->
            
					
				<li><a href="/home/member/line"><p class="imgp"><img src="http://qiniu.baoliy168.com/%E7%BB%84%203568%403x.png"
				                                                         class="am-img-responsive"/></p>
				         <p class="namep">客服中心</p>
				         <p class="lastp">&nbsp;</p></a></li>
					

							 
				<li><a href="/home/member/transfer"><p class="imgp"><img src="http://qiniu.baoliy168.com/%E7%BB%84%208136%403x.png"
				                                                         class="am-img-responsive"/></p>													
				         <p class="namep">积分转账</p>
				         <p class="lastp">&nbsp;</p></a></li>
						 
				<li v-if="count.StoreStatus == 1 || count.StoreStatus == null" >
				    <a href="/home/stores/index">
				        <p class="imgp">
				            <img src="http://qiniu.baoliy168.com/%E7%BB%84%208146%403x.png" class="am-img-responsive" />
				        </p>
				        <p class="namep">门店中心</p>
				        <p class="lastp">&nbsp;</p>
				    </a>
				</li>

{{--				<li v-else>--}}
{{--				    <a href="#" v-on:click="storetype(count.StoreStatus)" >--}}
{{--				        <p class="imgp">--}}
{{--				            <img src="/img/home/user/apply.png" class="am-img-responsive" />--}}
{{--				        </p>--}}
{{--				        <p class="namep">门店中心</p>--}}
{{--				        <p class="lastp">&nbsp;</p>--}}
{{--				    </a>--}}
{{--				</li>--}}
            <li><a href="/home/member/myuser"><p class="imgp"><img src="/img/home/user/111111.png" class="am-img-responsive"/></p>
                    <p class="namep">个人设置</p>
                    <p class="lastp">&nbsp;</p></a></li>
            <li><a href="/home/logout"><p class="imgp"><img src="http://qiniu.baoliy168.com/%E7%BB%84%208131%403x%20%281%29.png" class="am-img-responsive" /></p><p class="namep">退出登录</p></a></li>


            {{--<li><a href="/home/timeShop/total"><p class="imgp"><img src="/img/home/user/myearning.png"--}}
                                                                    {{--class="am-img-responsive"/></p>--}}
                    {{--<p class="namep">限时购业绩</p>--}}
                    {{--<p class="lastp">&nbsp;</p></a></li>--}}
            <li v-if="count.is_shareholder>0"><a href="/home/shareholder/shareholder"><p class="imgp"><img
                                src="/img/home/user/shareholder.png"
                                class="am-img-responsive"/></p>
                    <p class="namep">股东分红</p>
                    <p class="lastp">&nbsp;</p></a></li>
          <!--   <li v-if="count.is_agency>0"><a href="/home/agentBonus/index"><p class="imgp"><img
                              src="/img/home/user/agency.png"
                              class="am-img-responsive"/></p>
                  <p class="namep">代理业绩</p>
                  <p class="lastp">&nbsp;</p></a></li> -->
        </ul>

        </div>

        <div class="am-modal am-modal-no-btn notice" tabindex="-1" :id="'notice'+index" v-for="(val,index) in noti" >
        <div class="am-modal-dialog">
            <div class="am-modal-hd">
                <p class="head"><span class="head-left">@{{ val.release_time }}</span><span
                            class="head-right">公司最新公告</span></p>
                <a href="javascript: void(0)" class="am-close am-close-spin" data-am-modal-close style="top: -149px;">&times;</a>
            </div>
            <div class="am-modal-bd">
                <h3 class="title">@{{ val.notice_name }}</h3>
                <!-- <p class="title1">全国各代理:</p> -->
                <p class="content" v-html="val.content"></p>
            </div>
        </div>
    </div>
    @include('Home.foot')
</div>
</body>
@if (count($errors) > 0)
    @foreach ($errors->all() as $error)
        <script>
            layer.msg("{{$error}}");
        </script>
    @endforeach
@endif
<script>
    var app = new Vue({
        el: "#app",
        data: {
            title: '会员中心',
            noti: [{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{}],
            index: 1,
            count: {},
            rollContent:'',
            phone:{{ Session::get('home_user')->phone }}
        },
        watch: {
            index: function (index) {
                var id = '#notice' + (index + 1)
                $(id).modal('open')
            }
        },
        methods: {
             //公告
             notice: function () {
                $('#notice0').modal('open')
                sessionStorage.setItem("showNotice", "0");
                for (let item of this.noti.keys()) {
                    var id = '#notice' + item
                    $(id).on('close.modal.amui', function () {
                        app.index = item
                    });
                }
            },
            //初始化 系统管理员列表
            initialize: function () {
                 //获取公告
                var sessionShow = sessionStorage.getItem('showNotice')
                var by_num = {{ Session::get('home_user')->platform_profit }};
                console.log(by_num)
                // return false;
                // if(!sessionShow){

                    $.post("/home/notice", {'_token': '{{csrf_token()}}'}, function (res) {
                        if (res.code) {
                            sessionStorage.setItem("showNotice", "1");
                            app.noti = res.data
                            app.notice()
                        } else {
                            // layer.msg(res.data,{icon:7});
                        }
                    });
                

                $.post("/home/index", {'_token': '{{csrf_token()}}'}, function (res) {
                    if (res.code) {
                        app.count = res.data
                        app.rollContent = res.data.warning
                        if(app.rollContent){
                            app.$nextTick(function () {
                                app.rollBar()
                            })
                        }
                    } else {
                        layer.msg(res.data,{icon:7});
                    }
                });
            },
            storetype:function(e){
                switch (e) {
                    case 0:
                        layer.msg("审核中,请耐心等待!");
                        break;
                    case 2:
                        layer.msg("对不起,你的申请已被驳回,请到问题反馈处提交获取驳回原因!");
                        break;
                    default:
                        layer.msg("门店不存在!");
                        break;
                }
            },
            //滚动条
            rollBar(){
                var scrollWidth = $('.roll-content').width()
                var rollWidth = $('.roll').width()
                var num = 0
                app.timer = setInterval(function () {
                    if(scrollWidth<rollWidth){
                        if(num<scrollWidth){
                            $('.roll-content').css({left:-num})
                            num+=1
                        }else {
                            num=0;
                        }
                    }else {
                        if(num<scrollWidth-rollWidth+50){
                            $('.roll-content').css({left:-num})
                            num+=1
                        }else {
                            num=0;
                        }
                    }

                },50)
            }
        },
        //自动执行
        mounted: function () {
            this.initialize();
        },
    })
</script>
</html>
